<template>
    <a-input-number :placeholder="i18n('filterList.stripQuantity','截断数量')" :min="0" style="width: 100%" v-model="args"></a-input-number>
</template>

<script>
  export default {
    name: "StripPrefixEdit",
    props: ["value"],
    data() {
      return {
        args: ""
      }
    },
    created() {
      this.init();
    },
    methods: {
      i18n(name,text,key){
          return this.$ti18(name,text,"SysRouting",key);
      },
      init() {
        if (this.value.filterArgs == "") {
          this.args = "";
        } else {
          this.args = (JSON.parse(this.value.filterArgs))._genkey_0;
        }
      }
    },
    watch: {
      args:function(val,oldval){
        if(val){
          var obj={
            _genkey_0:val
          }
          this.value.filterArgs=JSON.stringify(obj);
        }
      }
    },
  }
</script>

<style scoped>

</style>